
package com.insigma.business.qrcode.job.service.impl;

import com.insigma.business.qrcode.common.service.SequenceGenerator;
import com.insigma.business.qrcode.job.dao.JobFairRecruitPositionDao;
import com.insigma.business.qrcode.job.dto.search.JobFairRecruitPositionBSearcher;
import com.insigma.business.qrcode.job.entity.JobFairRecruitPositionDO;
import com.insigma.business.qrcode.job.service.JobFairRecruitPositionService;
import com.insigma.business.qrcode.soldier.dto.SequenceNameConstant;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service("jobFairRecruitPositionService")
public class JobFairRecruitPositionServiceImpl implements JobFairRecruitPositionService {

    @Autowired(required = false)
    private JobFairRecruitPositionDao jobFairRecruitPositionDao;
    @Autowired(required = false)
    private SequenceGenerator sequenceGenerator;

    
    @Override
    public List<JobFairRecruitPositionDO> search(final JobFairRecruitPositionBSearcher jobFairRecruitPositionBSearcher) {
        return jobFairRecruitPositionDao.search(jobFairRecruitPositionBSearcher);
    }
   
    @Override
    public JobFairRecruitPositionDO get(final String id){
        return jobFairRecruitPositionDao.get(id);
    }

    
    @Override
    public Integer insert(final JobFairRecruitPositionDO jobFairRecruitPositionDO){
        jobFairRecruitPositionDO.setId(sequenceGenerator.genKey(SequenceNameConstant.JOB_FAIR_RECRUIT_POSITION_ID));
        return jobFairRecruitPositionDao.insert(jobFairRecruitPositionDO);
    }

    
    @Override
    public Integer update(final JobFairRecruitPositionDO jobFairRecruitPositionDO){
        return jobFairRecruitPositionDao.update(jobFairRecruitPositionDO);
    }

    
    @Override
    public Integer delete(final String id, final String modifierType, final String modifierId){
        return jobFairRecruitPositionDao.delete(id,modifierType,modifierId);
    }

    @Override
    public int countByFairAndStatus(String fairId, String status) {
        return jobFairRecruitPositionDao.countByFairAndStatus(fairId, status);
    }

}
